<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册列表</title>
    <#assign path="${springMacroRequestContext.getContextPath()}" >
    <link rel="stylesheet" href="${path}/static/bootstrap-3.4.1/css/bootstrap.css" type="text/css" />
    <link rel="stylesheet" href="${path}/static/bootstrap-3.4.1/css/bootstrap-theme.css" type="text/css" />
    <link rel="stylesheet" href="https://at.alicdn.com/t/c/font_2937172_jowcw32m21j.css" />
    <script src="${path}/static/bootstrap-3.4.1/js/jquery.min.js"></script>
    <script src="${path}/static/bootstrap-3.4.1/js/bootstrap.js"></script>
    <script src="${path}/static/bootstrap-3.4.1/js/bootstrap-confirmation.min.js"></script>
</head>
<body class="container">
<div class="row">
    <div class="col-md-8"></div><#include "common/welcome.html" />
</div>
<ul class="nav nav-tabs">
    <#list prodTypeList as pType>
    <li role="presentation"><a href="${path}/list/${pType.id}">${pType.typeName}</a></li>
    </#list>
<li role="presentation" class="active"><a href="${path}/prod_group">注册列表</a></li>
</ul>
<div>
    <table class="table table-bordered table-striped table-hover">
        <thead>
        <th>注册账号</th>
        <th>真实姓名</th>
        <th>手机号</th>
        <th>公司</th>
        <th>注册时间</th>
        <th style="text-align: center;">操作</th>
        </thead>
        <tbody>
        <#list registList as data>
        <tr id="tr_${data.id}">
            <td>${(data.account)!''}</td>
            <td>${(data.realName)!''}</td>
            <td>${(data.mobile)!''}</td>
            <td>${(data.companyName)!''}</td>
            <td><#if data.createTime??>${data.createTime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
            <td  style="text-align: center;width: 20%;">&nbsp;&nbsp;
                <#if data.status==0>
                <button class="btn btn-default btn-xs" onclick="goConfirm(${(data.id)!''})">审核</button>&nbsp;&nbsp;
                </#if>
            </td>
        </tr>
        </#list>
        </tbody>
    </table>
</div>
<#include "common/jscommon.html" />
<#include "common/userApplyConfirm.html" />
<script type="text/javascript">
    var applyId;

    /**
     * 打开新增分组弹窗
     */
    function goConfirm(app_id){
        applyId=app_id;
        $('#userConfirmModal').modal({
            keyboard: false
        });
    }

    function doRegistConfirm(){
        $.ajax({
            url: bathPath_+'/regist/confirm',
            data:{id:applyId,userType:$("#userType").val()},
            type: 'post',
            timeout: 30000,
            beforeSend: function () {
            },
            success: function (result) {
                if (0 == result.error) {
                    window.location.reload();
                }else{
                    alert(result.msg);
                }
            }
        });
    }
</script>
</body>
</html>